% TEST_ID: LANG-EXPAND-0092
% CATEGORY: stdlib/arithmetic_ops/triangle
% 测试 三角函数

function test_cscd_sec_secd_sech()

assert(cosd(360) - 1 < 1e-12)
assert(cosd(180) + 1 < 1e-12)
assert(cosd(90) == 0)
assert(cosd(45) - 0.707106781186548 < 1e-12)
assert(abs(real(cosd(45+45i)) - 0.936640069431430) < 1e-12 && abs(imag(cosd(45+45i)) + 0.614243127486596) < 1e-12)

assert(abs(sec(3) + 1.010108665907994) < 1e-12)
assert(abs(real(sec(2+2i)) + 0.117475142661415) < 1e-12 && abs(imag(sec(2+2i)) - 0.247454185820760) < 1e-12)

assert(abs(secd(45) - 1.414213562373095) < 1e-12)
assert(abs(real(secd(45 + 45i)) - 0.746571100779055) < 1e-12 && abs(imag(secd(45 + 45i)) - 0.489596999743997) < 1e-12)

assert(round(sech(2), 15) == 0.265802228834080)
assert(abs(real(sech(2+2i)) + 0.117475142661415) < 1e-12 && abs(imag(sech(2+2i)) + 0.247454185820760) < 1e-12)

